#include "response.h"

Response::Response() : m_state(Fail) , m_msg(nullptr) {}

std::shared_ptr<Message> &Response::message()
{
    return m_msg;
}

void Response::setMessage(const std::shared_ptr<Message> &msg)
{
    m_msg = msg;
}

void Response::setMessage(std::shared_ptr<Message> &&msg)
{
    m_msg.swap(msg);
}

Response::State Response::state() const
{
    return m_state;
}

void Response::setState(State state)
{
    m_state = state;
}
